part of 'use_case.dart';

abstract class WebPurchasedSubscriptionCancellationOutput {
  BuiltList<AppStorePurchasedItem> get appStorePurchasedItems;

  BuiltList<GooglePlayPurchasedItem> get googlePlayPurchasedItems;

  BuiltList<WebPurchasedItem> get webPurchasedItems;

  BuiltList<PurchasedItemModel> get activePurchasedItemModels;

  BuiltList<GooglePlayPurchasedSubscriptionModel> get pausedGooglePlayPurchasedSubscriptionModels;

  BuiltList<PurchasedSubscriptionModel> get expiredPurchasedSubscriptionModels;
}

class OptimisticWebPurchasedSubscriptionCancellationOutput extends Equatable
    implements WebPurchasedSubscriptionCancellationOutput {
  const OptimisticWebPurchasedSubscriptionCancellationOutput({
    required this.appStorePurchasedItems,
    required this.activePurchasedItemModels,
    required this.googlePlayPurchasedItems,
    required this.webPurchasedItems,
    required this.pausedGooglePlayPurchasedSubscriptionModels,
    required this.expiredPurchasedSubscriptionModels,
  });

  @override
  final BuiltList<AppStorePurchasedItem> appStorePurchasedItems;

  @override
  final BuiltList<GooglePlayPurchasedItem> googlePlayPurchasedItems;

  @override
  final BuiltList<WebPurchasedItem> webPurchasedItems;

  @override
  final BuiltList<PurchasedItemModel> activePurchasedItemModels;

  @override
  final BuiltList<GooglePlayPurchasedSubscriptionModel> pausedGooglePlayPurchasedSubscriptionModels;

  @override
  final BuiltList<PurchasedSubscriptionModel> expiredPurchasedSubscriptionModels;

  @override
  List<Object?> get props {
    return [
      appStorePurchasedItems,
      googlePlayPurchasedItems,
      webPurchasedItems,
      activePurchasedItemModels,
      pausedGooglePlayPurchasedSubscriptionModels,
      expiredPurchasedSubscriptionModels,
    ];
  }
}

class SuccessfulWebPurchasedSubscriptionCancellationOutput extends Equatable
    implements WebPurchasedSubscriptionCancellationOutput {
  const SuccessfulWebPurchasedSubscriptionCancellationOutput({
    required this.appStorePurchasedItems,
    required this.activePurchasedItemModels,
    required this.googlePlayPurchasedItems,
    required this.webPurchasedItems,
    required this.pausedGooglePlayPurchasedSubscriptionModels,
    required this.expiredPurchasedSubscriptionModels,
  });

  @override
  final BuiltList<AppStorePurchasedItem> appStorePurchasedItems;

  @override
  final BuiltList<GooglePlayPurchasedItem> googlePlayPurchasedItems;

  @override
  final BuiltList<WebPurchasedItem> webPurchasedItems;

  @override
  final BuiltList<PurchasedItemModel> activePurchasedItemModels;

  @override
  final BuiltList<GooglePlayPurchasedSubscriptionModel> pausedGooglePlayPurchasedSubscriptionModels;

  @override
  final BuiltList<PurchasedSubscriptionModel> expiredPurchasedSubscriptionModels;

  @override
  List<Object?> get props {
    return [
      appStorePurchasedItems,
      googlePlayPurchasedItems,
      webPurchasedItems,
      activePurchasedItemModels,
      pausedGooglePlayPurchasedSubscriptionModels,
      expiredPurchasedSubscriptionModels,
    ];
  }
}

class FailedWebPurchasedSubscriptionCancellationOutput extends Equatable
    implements WebPurchasedSubscriptionCancellationOutput {
  const FailedWebPurchasedSubscriptionCancellationOutput({
    required this.appStorePurchasedItems,
    required this.activePurchasedItemModels,
    required this.googlePlayPurchasedItems,
    required this.webPurchasedItems,
    required this.pausedGooglePlayPurchasedSubscriptionModels,
    required this.expiredPurchasedSubscriptionModels,
    required this.failure,
  });

  @override
  final BuiltList<AppStorePurchasedItem> appStorePurchasedItems;

  @override
  final BuiltList<GooglePlayPurchasedItem> googlePlayPurchasedItems;

  @override
  final BuiltList<WebPurchasedItem> webPurchasedItems;

  @override
  final BuiltList<PurchasedItemModel> activePurchasedItemModels;

  @override
  final BuiltList<GooglePlayPurchasedSubscriptionModel> pausedGooglePlayPurchasedSubscriptionModels;

  @override
  final BuiltList<PurchasedSubscriptionModel> expiredPurchasedSubscriptionModels;

  final WebPurchasedSubscriptionCancellationFailure failure;

  @override
  List<Object?> get props {
    return [
      appStorePurchasedItems,
      googlePlayPurchasedItems,
      webPurchasedItems,
      activePurchasedItemModels,
      pausedGooglePlayPurchasedSubscriptionModels,
      expiredPurchasedSubscriptionModels,
      failure,
    ];
  }
}
